package com.spark.incoicings.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spark.incoicings.vo.DemandVo;
import com.spark.invoicings.entity.Demand;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface DemandMapper extends BaseMapper<Demand> {

    /**
     * 带条件查询所有采购需求及分页
     * @param map
     * @return
     */
    List<Demand> selectDemandAll(Map<String, Object> map);

    /**
     * 根据采购需求id获取采购需求状态和类型
     * @param dId
     * @return
     */
    DemandVo selectDemandVo(Integer dId);

    /**
     * 根据id获取采购需求
     * @param demandId
     * @return
     */
    Demand selectDemandById(Integer demandId);
}
